<template>
    <div class="know">
        <a-input-search v-model:value="params.words" placeholder="请输入关键词" enter-button @search="getData" />
        <div class="test">
            {{ describe }}
        </div>
    </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { baiduKnowApi } from '@/api/index'
const params = ref({
    id: 10000732,
    key: 'b9bea682d5bbf442f27ba8637d558707',
    words: ''
})
const describe = ref("")
const getData = async () => {
    const res = await baiduKnowApi(params.value)
    describe.value = res.msg
}
onMounted(() => {

})
</script>

<style scoped lang="scss">
.know {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    padding: 20px;

    .test {
        @include scroll-bar();
        text-indent: 2rem;
        padding: 10px;
        font-size: 18px;
        flex: 1;
        overflow-y: auto;
        border: 1px solid rgba(128, 128, 128, 0.508);
        margin-top: 10px;
        border-radius: 10px;
        line-height: 30px;
        font-family: 'Digital','yasong',
            sans-serif;
        letter-spacing: 5px;
        text-align: justify;
    }
}
</style>